<html lang="en" style="font-size: 100px;">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0">
<link rel="icon" href="/favicon.ico">
<title>注册</title>
<style>body {
        background: #f2f2f2;
      }
      @media screen and (min-width: 767px) {
        #app {
          width: 540px;
          margin: 0 auto;
          min-height: 100vh;
          box-sizing: border-box;
          border: 1px solid #999;
          /* overflow-y: hidden; */
        }
        .van-popup--top {
          width: 540px;
          margin: 0 auto;
        }
      }</style>
	<link href="../css/app.2150f8cc.css" rel="stylesheet">
	<link href="../css/chunk-vendors.e9f6096e.css" rel="stylesheet">
	<link href="../css/chunk-43155bdd.7506223a.css" rel="stylesheet">
	<link href="../layer/skin/layer.css" rel="stylesheet">
	<script>
if(('standalone' in window.navigator)&&window.navigator.standalone){
var noddy,remotes=false;
document.addEventListener('click',function(event){
noddy=event.target;
while(noddy.nodeName!=='A'&&noddy.nodeName!=='HTML') noddy=noddy.parentNode;
if('href' in noddy&&noddy.href.indexOf('http')!==-1&&(noddy.href.indexOf(document.location.host)!==-1||remotes)){
event.preventDefault();
document.location.href=noddy.href;
}
},false);
}
</script></head>
	  <body><div id="app"><div data-v-6b87e22a="" class="login">
	  
	  <div data-v-6b87e22a="" class="login-title"><div data-v-6b87e22a="">注   册</div></div>
	   <form name="AddUser" action="http://www.main.com:8082/api/Login/register" id="registerForm"  class="formlogin mui-input-group form">
	  <div data-v-6b87e22a="" class="password"><div data-v-6b87e22a="" class="login-account van-cell van-field">
	   <div class="van-cell__value van-cell__value--alone"><div class="van-field__body"><input  placeholder="请输入手机号" class="van-field__control" name="mobile" id="mobile" maxlength="11" type="number"></div></div></div></div>
	     <div data-v-6b87e22a="" class="password"><div data-v-6b87e22a="" class="login-account van-cell van-field">
	   <div class="van-cell__value van-cell__value--alone"><div class="van-field__body"><input type="text" placeholder="请输入姓名" class="van-field__control" id="index_username" name="username" ></div></div></div></div>
	  <div data-v-6b87e22a="" class="password"><div data-v-6b87e22a="" class="login-account van-cell van-field"><div class="van-cell__value van-cell__value--alone"><div class="van-field__body"><input type="password" name="login_pwd" placeholder="请输入密码" class="van-field__control"></div></div></div></div>
	  <div data-v-6b87e22a="" class="password"><div data-v-6b87e22a="" class="login-account van-cell van-field"><div class="van-cell__value van-cell__value--alone"><div class="van-field__body"><input type="password" id="confirm_password"  name="relogin_pwd" placeholder="请确认密码" class="van-field__control"></div></div></div></div>
	  <div data-v-6b87e22a="" class="password"><div data-v-6b87e22a="" class="login-account van-cell van-field">
	   <div class="van-cell__value van-cell__value--alone"><div class="van-field__body"><input type="text" placeholder="请输入邀请码" class="van-field__control" name="pid"></div></div></div></div>
	  <div data-v-6b87e22a="" class="password"><div data-v-6b87e22a="" class="login-account van-cell van-field"><div class="van-cell__value van-cell__value--alone"><div class="van-field__body"><input type="text"  id="txyzm" name="code" value="" placeholder="请输入验证码" class="van-field__control"><img src="" id="verify_img" style="width: 28%;float: right;height: 30px;border-radius: 50px;" onclick="imvr();"></div></div></div></div>
	 <!--div data-v-6b87e22a="" class="account"><div data-v-6b87e22a="" class="login-account van-cell van-field">
	   <div class="van-cell__value van-cell__value--alone"><div class="van-field__body"><input type="text" placeholder="请输入短信验证码" class="van-field__control" id="sms_code" name="sms_code"  ></div></div></div></div-->

		   <input type="text" name="uuid" id="uuid" value="" style="display: none;">

		   <div style="width: 292px;
    height: 50px;
    background: #1aad17;
    -moz-border-radius: 15px;
    -webkit-border-radius: 15px;
    border-radius: 25px;
    margin: .1rem .2rem .1rem;margin-top:3%"  id="submit"  onclick="adduser()">
	<p style="color: #fff; margin-left: 43%;font-size: 21px;padding-top: 4%;font-family: Microsoft YaHei;">注 册</p></div>
	
          <a  href="login.html"><div style="width: 292px;
    height: 50px;
    background: #1aad17;
    -moz-border-radius: 15px;
    -webkit-border-radius: 15px;
    border-radius: 25px;
    margin: .1rem .2rem .1rem;">
	<p style="color: #fff; margin-left: 43%;font-size: 21px;padding-top: 4%;font-family: Microsoft YaHei;">登 录</p></div></a>
	  </form></div>
	  
	 
	  </div>
	  <script type="text/javascript" src="../js/jquery.min.js"></script>
	  <script type="text/javascript" src="../layer/layer.js" ></script>
	  <script type="text/javascript" src="../js/tools.js" ></script>
<script type="text/javascript">
	var uid ;
	function deviceReady(){
		uid = uuid();
		$('#uuid').val(uid);
		var url = 'http://www.main.com:8082/api/Login/verify?uuid='+uid;
		$('#verify_img').attr('src',url);
	}
function imvr(){
		uid = uuid();
			$('#uuid').val(uid);
		   var verifyURL = "http://www.main.com:8082/api/Login/verify?uuid="+uid;
		   var time = new Date().getTime();
		   $("#verify_img").attr({
		      "src" : verifyURL 
		   });
		}
    var wait = 60;

    function time(o) {       

        if ($("#mobile").val() == "") {
			msg_alert("请填写手机号");
            return false;
        }       
if ($("#txyzm").val() == "") {
	msg_alert("请填写图形验证码");
            return false;
        } 
       /* if (!isMobile($("#phone").val())) {
            layer.msg("手机格式不正确");
            return false;
        }*/
		var success = function(msg){
			if(msg.sf==0){
				msg_alert("验证码已经发送，注意查收");
			}else{
				msg_alert("发送失败");
			}
		}
		var post_data = { phone: $("#mobile").val() ,code: $("#txyzm").val()};
		var error = function(data){}
		beginAsyncAjax('Login/sendPhone',post_data,'POST',success,error)
        okssss(o);
    }
    var wait = 60;
    function okssss(o) {
        if (wait == 0) {
            $(o).removeAttr("disabled");
            $(o).val("获取验证码");
            wait = 120;
        } else {
            $(o).attr("disabled", true);
            $(o).val("等待(" + wait + ")");
            wait--;
            setTimeout(function() {
                okssss(o);
            },
            1000);
        }
    }

    function adduser(){
        //验证注册
        var thisform=document.forms['AddUser'];
        var   reg = /^[0-9a-zA-Z]{6,20}$/;
        var   mobile_rex=/^1[3456789]\d{9}$/;
        var   username=thisform.username.value;//昵称
        var   mobile=thisform.mobile.value;
        var   login_pwd=thisform.login_pwd.value;
        var   relogin_pwd=thisform.relogin_pwd.value;
        if(username=='' || username==null){
			msg_alert('请输入姓名');
            return false;
        }

        if(mobile=='' || mobile==null){
			msg_alert('请输入手机号');
            return false;
        }
        if(!mobile_rex.test(mobile)){
			msg_alert('手机号码错误');
            return false;
        }

        if(login_pwd=='' || login_pwd==null){
			msg_alert('请输入密码');
            return false;
        }
        if(!reg.test(login_pwd)){
			msg_alert("登录密码只能为6-20位数字或字母");
            return false;
        }
        if(login_pwd!=relogin_pwd){
            msg_alert("两次输入登录密码不一致");
            return false;
        }
        var post_url = $("form[name='AddUser']").attr('action');
        var post_data= $("form[name='AddUser']").serialize();
		var success = function(re_data){
			if(re_data.status==1){
				msg_alert(re_data.message);  //,data.url);
				setTimeout(function (args) {
					gotoDetail('login.html',true);
				}, 3000);
			}else{
				msg_alert(re_data.message);
			}
		}
		var error = function(data){}
		beginAsyncAjax(post_url,post_data,'POST',success,error)
    }


</script>			
	  </body>
	  </html>